package com.dj.merchant.endpoint;


import com.dj.merchant.model.MerchantInfo;
import com.dj.merchant.model.MerchantParamList;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient("dj-bas-merchant-service")
public interface MerchantInfoService {
    @RequestMapping(value = "/base/merchant/v1.0/merchant/create",method = RequestMethod.POST)
    Object createMerchant(@SpringQueryMap MerchantInfo merchantInfo);

    @RequestMapping(value = "/base/merchant/v1.0/merchant/get/detail",method = RequestMethod.GET)
    Object getMerchantById(@RequestParam("merchantId") Long merchantId);

    @RequestMapping(value = "/base/merchant/v1.0/merchant/query",method = RequestMethod.POST)
    List<MerchantInfo> queryBySearch(@RequestBody MerchantParamList merchantParamList);

    @RequestMapping(value = "/base/merchant/v1.0/merchant/update",method = RequestMethod.POST)
    Integer updateMerchantByExample(@SpringQueryMap MerchantInfo merchantInfo);
}
